﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="goods_add.aspx.cs" Inherits="WebSite.admin.product.goods_add" %>


<%@ Register Src="../languages.ascx" TagName="head" TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>良臣直销网 </title>
    <link href="../main.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
        parent.maintitle.innerHTML = "商品管理";
        parent.contentmain.innerHTML = "<span class='title01'>所在位置：</span>添加新商品-通用信息"
    </script>
    <script language='javascript'>
	var path=(window.top.location).toString();
	if(path.indexOf('login.aspx')==-1){
	if (path.indexOf('index.aspx')==-1){
	 window.top.location='index.aspx';
	}
	}
	function handlePromote(str)
	{
	var proprice4=document.getElementById('proprice4');
	var prodate1=document.getElementById('prodate1');
	var prodate2=document.getElementById('prodate2');
	if(str.checked)
	{
	 proprice4.disabled=false;
	 prodate1.disabled=false;
	 prodate2.disabled=false;
	}else{
	proprice4.disabled=true;
	 prodate1.disabled=true;
	 prodate2.disabled=true;
	}
	}
	function handleAutoThumb(str)
	{
	var smallpic=document.getElementById('smallpic');
	var file2=document.getElementById('file2');
	var Button2=document.getElementById('Button2');
	
	if(str.checked)
	{
	 smallpic.disabled=true;
	 file2.disabled=true;
	 Button2.disabled=true;
	}else{
	 smallpic.disabled=false;
	 file2.disabled=false;
	 Button2.disabled=false;
	}
	}
	function marprice()
	{
	 var proprice1=document.getElementById('proprice1');
	 var prices=<%=Convert.ToSingle(WebSite.info.info1("","shoppricebi")) %>;
	 //alert(prices);
	 var proprice3=document.getElementById('proprice3');
	  proprice3.value=((proprice1.value)*prices);
	}
	function markeprice()
	{
	var proprice3=document.getElementById('proprice3');
	proprice3.value=Math.round(proprice3.value);
	}
	</script>
	<script language="javascript" src="../../js/function.js"></script>
    <script language="javascript">
        function CheckFrm() {
            var obj = 'proname,typeid,proprice1,<%=this.ddlProfessionAreaType.ClientID %>';
            var objt = '1,1,8';
            var msg = '商品名称,商品分类,本店售价,专区类别';
            var chks = chk(form1, obj, objt, msg)
            if (chks) {
                if (form1.typeid.value == "0") {
                    alert("请选择商品分类");
                    return false;
                }
            }
            if (!chks) {
                return false;
            }

           
        }
    </script>
    <script type="text/javascript" language="javascript">
        var i = 1
        function addFile() {
            if (i < 8) {
                var str = '<BR>&nbsp;&nbsp;&nbsp; 颜色版本值：<input name="text" type="text" maxlength="20" style=width:50px />价格：<input name="textprice" type="text" maxlength="20" value="0" style=width:50px />'
                document.getElementById('MyFile').insertAdjacentHTML("beforeEnd", str)

            }
            else {
                alert("您一次最多只能上传8条！")
            }
            i++
        }
        function addsz() {
            if (document.getElementById('s1').style.display == '') {
                document.getElementById('s1').style.display = 'none';
                document.getElementById('MyFile').style.display = '';
                document.form1.Spe.value = "1";
            } else {
                document.getElementById('s1').style.display = '';
                document.getElementById('MyFile').style.display = 'none';
                document.form1.Spe.value = "0";
            }
        }
   </script> 
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <center>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F1F4F7">
<tr>
<td height="382" align="center" valign="top">
  <br />
  <%if (Request.QueryString["pid"] != null){ %>
  <table Width="98%" border="1" cellpadding="3" cellspacing="1" bordercolor="#E2E7EB">
    <tr align="center">
      <td bgcolor="#C9D2DA"><a href="goods_add.aspx?pid=<%=Request.QueryString["pid"]%>" class="menu02">通用信息</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add02.aspx?pid=<%=Request.QueryString["pid"]%>">详细描述</a></td>
      <!--td bgcolor="#E2E7EB"><a href="goods_add08.aspx?pid=<%=Request.QueryString["pid"]%>">商品参数</a></td-->
      <td bgcolor="#E2E7EB"><a href="goods_add03.aspx?pid=<%=Request.QueryString["pid"]%>">其他信息</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add04.aspx?pid=<%=Request.QueryString["pid"]%>">商品相册</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add05.aspx?pid=<%=Request.QueryString["pid"]%>">关联商品</a></td>
      <!--td bgcolor="#E2E7EB"><a href="goods_add06.aspx?pid=<%=Request.QueryString["pid"]%>">配件</a></td-->
      <td bgcolor="#E2E7EB"><a href="goods_add07.aspx?pid=<%=Request.QueryString["pid"]%>">关联文章</a></td>
    </tr>
  </table>
  <%}else{ %>
  <table Width="98%" border="1" cellpadding="3" cellspacing="1" bordercolor="#E2E7EB">
    <tr align="center">
      <td bgcolor="#C9D2DA"><a href="goods_add.aspx" class="menu02">通用信息</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add02.aspx">详细描述</a></td>
      <!--td bgcolor="#E2E7EB"><a href="goods_add08.aspx">商品参数</a></td-->
      <td bgcolor="#E2E7EB"><a href="goods_add03.aspx">其他信息</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add04.aspx">商品相册</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add05.aspx">关联商品</a></td>
      <!--td bgcolor="#E2E7EB"><a href="goods_add06.aspx">配件</a></td-->
      <td bgcolor="#E2E7EB"><a href="goods_add07.aspx">关联文章</a></td>
    </tr>
  </table>
  <%} %>
  <br />
  
  <table Width="98%" border="0" cellpadding="5" cellspacing="0">
    <tr id="cn" style="display:;" runat="server">
      <td width="23%" align="right" class="title01">商品名称：</td>
      <td align="left"><input size="30" name="proname" id="proname" runat="server" />*</td>
    </tr>
    <tr>
      <td align="right" class="title01"><a title="点击此处查看提示信息" href="javascript:clicksa(p1);"><img height="16" alt="点击此处查看提示信息" src="../images/notice.gif" width="16" border="0" /></a> 商品货号： </td>
      <td align="left"><input name="procode" id="procode" runat="server" /><span id="p1" style="display:none"><br />如果您不输入商品货号，系统将自动生成一个唯一的货号。</span></td>
    </tr>
    <tr>
      <td align="right" class="title01">专区类别：</td>
      <td align="left">
       <asp:DropDownList ID="ddlProfessionAreaType" runat="server"></asp:DropDownList>
          </td>
    </tr>
    <tr id="typecn"  style="display:;" runat="server">
      <td align="right" class="title01">商品分类：</td>
      <td align="left"><asp:DropDownList ID="typeid" runat="server">
                    <asp:ListItem Text="请选择类别" Value="0"></asp:ListItem>
                    </asp:DropDownList>
        *</td>
    </tr>
    <tr>
      <td align="right" class="title01">商品品牌：</td>
      <td align="left">
      <asp:DropDownList ID="propinpai" runat="server">
      <asp:ListItem Value="0">请选择品牌</asp:ListItem>
      </asp:DropDownList>
      
      </td>
    </tr>

    <tr>
      <td align="right" class="title01">兑换价：</td>
      <td align="left"><input value="0" name="proprice1" id="proprice1" runat="server" />*</td>
    </tr>
   
    <!--
    <tr>
      <td align="right" class="title01"><a title="点击此处查看提示信息" href="javascript:clicksa(p2);"><img height="16" alt="点击此处查看提示信息" src="../images/notice.gif" width="16" border="0" /></a>会员价格：</td>
      <td align="left">
          <asp:DataList ID="DataList1" runat="server" RepeatColumns="4" CellPadding="1" ForeColor="#333333" Height="100%" Width="98%">
          <ItemTemplate>
          <%# DataBinder.Eval(Container.DataItem, "rank") %><input id="proprice2_<%# DataBinder.Eval(Container.DataItem, "rankid") %>" name="proprice2_<%# DataBinder.Eval(Container.DataItem, "rankid") %>" value="<%# DataBinder.Eval(Container.DataItem, "price") %>" size=4 />
          </ItemTemplate></asp:DataList>
          <span id="p2" style="display:none">会员价格为-1时表示会员价格按会员等级折扣率计算。你也可以为每个等级指定一个固定价格</span></td>
    </tr>

    <tr>
      <td align="right" class="title01">购买赠积分：</td>
      <td align="left"><input value="0" name="proscore1" id="proscore1" runat="server" /></td>
    </tr>
    <tr style="display:none;">
      <td align="right" class="title01"><a title="点击此处查看提示信息" href="javascript:clicksa(p3);"><img height="16" alt="点击此处查看提示信息" src="../images/notice.gif" width="16" border="0" /></a> 积分购买额度：</td>
      <td align="left"><input value="0" name="proscore2" id="proscore2" runat="server" /><span id="p3" style="display:none"><br />购买该商品时最多可以使用多少钱的积分</span></td>
    </tr>
    <tr>
      <td align="right" class="title01">
          <asp:CheckBox ID="iscuxao" runat="server" />
        促销价：</td>
      <td align="left"><asp:TextBox ID="proprice4" runat="server" Enabled="False">0</asp:TextBox>
     </td>
    </tr>
       
    <tr style="display:none;">
      <td align="right" class="title01" id="promote_5">促销日期：</td>
      <td align="left">
      <asp:TextBox ID="prodate1" runat="server" Enabled="False" style="behavior:url('../../LWDP.HTC');">2007-11-30</asp:TextBox>
        -
        <asp:TextBox ID="prodate2" runat="server" Enabled="False" style="behavior:url('../../LWDP.HTC');">2007-11-30</asp:TextBox>&nbsp;
      </td>
    </tr>
     -->
    <!--tr>
      <td align="right" class="title01">商品简单描述：</td>
      <td align="left"><asp:TextBox ID="promsg" runat="server" Height="58px" TextMode="MultiLine" Width="340px"></asp:TextBox></td>
    </tr-->
    <tr>
      <td align="right" class="title01">上传商品图片：</td>
      <td align="left"><asp:TextBox ID="bigpic" runat="server"></asp:TextBox><input id="file1" type="file" runat="server" /><asp:Button ID="Button1" runat="server" Text="上传" OnClick="Button1_Click" />&nbsp;卡尺寸：400*400
      </td>
    </tr>
    <tr>
      <td align="right" class="title01">上传商品缩略图：</td>
      <td align="left"><asp:TextBox ID="smallpic" runat="server"></asp:TextBox><input disabled="disabled" type="file" name="file2" id="file2" runat="server"/><asp:Button ID="Button2" runat="server" Text="上传" Enabled="false" OnClick="Button2_Click" />
          &nbsp;卡尺寸：200*200<br />
          <asp:CheckBox ID="CheckBox1" runat="server" Checked="true" />
        自动生成商品缩略图 </td>
    </tr>
    <tr>
      <td align="right">&nbsp;</td>
      <td height="50" align="left">
          <asp:ImageButton ID="ImageButton1" ImageUrl="../images/buttom-02.gif" runat="server" OnClick="ImageButton1_Click" />
       <a href="javascript:form1.reset();"><img src="../images/button03.gif" border="0" /></a></td>
      </tr>
  </table></td>
</tr>
</table>
</center>
    </div>
    </form>
</body>
</html>
